#pragma once

#include <sstream>
#include <readerwriterqueue.h>
#include <zmqpp/zmqpp.hpp>
#include "base/Logger.h"
#include "monitor/MonitorEvent.h"

namespace zeroplus::mq
{
    class ZmqMonitor : public zmqpp::monitor_t
    {
    private:
        int32_t numClients_;

    private:
        ZMQMonitor()
            : zmqpp::monitor_t(),
              numClients_(0)
        {
        }

        virtual ~ZMQMonitor()
        {
        }

        virtual void on_monitor_started()
        {
        }

        virtual void on_event_connected(const zmq_event_t &event, const char *addr)
        {
        }

        virtual void on_event_connect_delayed(const zmq_event_t &event, const char *addr)
        {
        }

        virtual void on_event_connect_retried(const zmq_event_t &event, const char *addr)
        {
        }

        virtual void on_event_listening(const zmq_event_t &event, const char *addr)
        {
        }

        virtual void on_event_bind_failed(const zmq_event_t &event, const char *addr)
        {
        }

        virtual void on_event_accepted(const zmq_event_t &event, const char *addr)
        {
        }

        virtual void on_event_accept_failed(const zmq_event_t &event, const char *addr)
        {
        }

        virtual void on_event_closed(const zmq_event_t &event, const char *addr)
        {
        }

        virtual void on_event_close_failed(const zmq_event_t &event, const char *addr)
        {
        }

        virtual void on_event_disconnected(const zmq_event_t &event, const char *addr)
        {
        }

        virtual void on_event_unknown(const zmq_event_t &event, const char *addr)
        {
        }
    };

}
